package com.lzy.cloud.order.remote;

import com.lzy.cloud.order.remote.dtos.BaseCouponDto;
import com.lzy.framework.core.output.Result;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @Description: 卡券接口
 * @Author:   gyl
 * @Date:     2018/7/9 17:31
 */
@FeignClient(name = "lzy-cloud-base")
public interface CouponApi {
    /**
     * 更新卡券
     * @param baseCouponDto
     * @return
     */
    @RequestMapping(value = "/coupon/update", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    Result update(@RequestBody BaseCouponDto baseCouponDto);

    /**
     * 卡券详情
     * @param id
     * @return
     */
    @RequestMapping(value = "/coupon/detail/{id}", method = RequestMethod.GET)
    Result detail(@PathVariable("id") Long id);

    /**
     * 房车租赁，根据ids查找卡券
     * @param ids
     * @return
     */
    @RequestMapping(value = "/coupon/find/car/rent/by/ids", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    Result findCarRentByIds(@RequestBody List<Long> ids);
}
